feat(logs): add logs when closing tickets#264
Merged
Akinator31 merged 1 commit intomainfrom Nov 28, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a new feature to log ticket closures in a dedicated logs channel, with contextual information and a link to the ticket panel, across both manual and scheduled closure flows. The change is implemented for close and force-close commands (both slash and text), as well as scheduled closure operations. It also introduces localized log messages in English and French.
Logging and Notification Enhancements
Added logic to send a log message to a configured logs channel whenever a ticket is closed (manual, force, or scheduled), including the user's name, user ID, and a direct link to the ticket panel. This is conditional on the
enable_logsconfig setting and presence of a logs channel ID. (rustmail/src/commands/close/slash_command/close.rs,rustmail/src/commands/close/text_command/close.rs,rustmail/src/commands/force_close/slash_command/force_close.rs,rustmail/src/commands/force_close/text_command/force_close.rs,rustmail/src/modules/scheduled_closures.rs)Ensured that log messages are sent in both English and French, with appropriate translations for the ticket closure log entry. (
rustmail/src/i18n/language/en.rs,rustmail/src/i18n/language/fr.rs)Codebase Maintenance
rustmail/src/commands/force_close/slash_command/force_close.rs,rustmail/src/commands/force_close/text_command/force_close.rs)